// 头像加载
function render(h, value, rows) {
    debugger

    if(value.length > 0)
    {
        let fileUrlBase = api.CONST["bd_var:d1a0a6c4-8a6a-4cbd-8c70-a52c277edb82"];
        let fileId = value[0].fileId;
        let serviceType = value[0].serviceType;
        let token = getToken();
        let fileUrl = fileUrlBase + "ma_file:" + fileId + "/preview-thumbnail?appId=1951088515799433216&access_token=" + token + "&serviceType=" + serviceType + "&w=500&h=500";
        debugger
        return h("img", {
            attrs: {
                src: fileUrl,
                width: "50px",
                height: "80dvh"
            }
        });
    }
    return h("span", value)
}

function getToken() {
    if(api.APP_TOKEN){
        return api.APP_TOKEN();
    }
    const token = decodeURIComponent(document.cookie).match(/linglong:access_token=(.+?);/)[1] || '';
    return token;
}


///linglongZT-api//unity/establish/file/
// ma_file:539320332068431cb6df778407dd0649/
// preview-thumbnail?appId=1951088515799433216&
// access_token=xMqvAuKSQrXHaF5BIMISK68YXSM&
// serviceType=PanFileService&w=500&h=500


// /linglongZT-api//unity/establish/file/
// ma_file:ma_file:539320332068431cb6df778407dd0649/preview-thumbnail?appId=1951088515799433216&access_token=xMqvAuKSQrXHaF5BIMISK68YXSM&serviceType=PanFileService&w=500&h=500
